﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Csla;

namespace EntModApp.EntServices.Business
{
  public abstract class CslaBusinessReadonlyObjectCollectionBase<TCollection, TObject, T> : 
    BusinessObjectCollectionBase<T>
    where TCollection : ReadOnlyListBase<TCollection, TObject>
    where T : class, IBusinessObject
  {
    private ReadOnlyListBase<TCollection, TObject> innerCollection;

    protected ReadOnlyListBase<TCollection, TObject> InnerCollection { get { return innerCollection; } }

    public CslaBusinessReadonlyObjectCollectionBase(ReadOnlyListBase<TCollection, TObject> innerCollection)
    {
      if (innerCollection == null)
        throw new ArgumentNullException("innerCollection");

      this.innerCollection = innerCollection;
      InitializeProxies();
    }

    private void InitializeProxies()
    {
      throw new NotImplementedException();
    }

    public override bool IsReadonly
    {
      get { return true; }
    }

    public override bool IsDirty
    {
      get { return false; }
    }

  }
}
